package com.vic.mvc.prepare.design.chain;
/**
 * 测试责任链模式
 * @author VIC
 *
 */
public class TestClient {

	public static void main(String[] args) {
		 //创建节点
	    GroupLeader gl = new GroupLeader();
	    ProjectManager pm = new ProjectManager();
	    DepartmentManager dm = new DepartmentManager();
	    CEO ceo = new CEO();
	    //建立责任链
	   gl.setHandler(pm);
	   pm.setHandler(dm);
	   dm.setHandler(ceo);
	   gl.doSome(4);
	}
}
